#include <iostream>
using namespace std;
class Animal
{
public:
	Animal(){};
	~Animal(){};
	virtual void speak()
	{
		cout<<"Animal speak"<<endl;
	}
};
class Cat:public Animal
{
public:
	Cat(){};
	~Cat(){};
	void speak()
	{
		cout<<"Cat speak"<<endl;
	}
};
void speak(Animal &a)
{
	a.speak();
}
int main(int argc, char const *argv[])
{
	Cat c;
	speak(c);
	cout<<endl;
	return 0;
}